//
//  IsNight.m
//  NeteaseNews
//
//  Created by liutaifeng on 16/5/3.
//  Copyright © 2016年 liutaifeng. All rights reserved.
//

#import "IsNight.h"

@implementation IsNight
+(BOOL)nowIsNight{
    NSUserDefaults *isNight = [NSUserDefaults standardUserDefaults];
    BOOL result = [isNight boolForKey:@"isNight"];
    if (result) {
        return YES;
    }else{
        return NO;
    }
}

+(void)changisNight{
    if (NO == [self nowIsNight]) {
        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"isNight"];
        NSLog(@"夜间模式");
    }
    else{
        [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"isNight"];
    }
}

+(UIColor *)nightColor{
    UIColor *color = [UIColor colorWithRed:26 / 255.0 green:26 / 255.0 blue:26 /255.0 alpha:1.0];
    return color;
}

+(UIColor *)textNightColor{
    UIColor *color = [UIColor colorWithRed:130 / 255.0 green:120 / 255.0 blue:130 /255.0 alpha:1.0];
    
    return color;
}

@end
